<div nz-row>
  <div nz-col nzSpan="6">
    <nz-input-group [nzSuffix]="searchIcon">
      <input type="text" nz-input placeholder="按新闻标题查询" id="newsSearch" [(ngModel)]="inputValue"
             (input)="onInput($event.target?.value)" [nzAutocomplete]="auto">
    </nz-input-group>
    <ng-template #searchIcon><i nz-icon type="search" (click)="onInput(inputValue)"></i></ng-template>
    <nz-autocomplete [nzDataSource]="filteredOptions" [nzBackfill]="true" #auto></nz-autocomplete>
  </div>
  <div nz-col nzSpan="6">
    <nz-form-label>新闻分类</nz-form-label>
    <nz-select [(ngModel)]="newsType" nzAllowClear nzPlaceHolder="新闻分类">
      <nz-option nzValue="jack" nzLabel="Jack"></nz-option>
      <nz-option nzValue="lucy" nzLabel="Lucy"></nz-option>
    </nz-select>
  </div>
  <div nz-col nzSpan="6">
    <nz-form-label>部门名称</nz-form-label>
    <nz-select [(ngModel)]="department" nzAllowClear nzPlaceHolder="部门名称">
      <nz-option nzValue="jack" nzLabel="Jack"></nz-option>
      <nz-option nzValue="lucy" nzLabel="Lucy"></nz-option>
    </nz-select>
  </div>
</div>
<nz-table #nzTable [nzData]="dataSet">
  <thead>
  <tr>
    <th nzShowCheckbox nzShowRowSelection [nzSelections]="listOfSelection" [(nzChecked)]="allChecked"
        [nzIndeterminate]="indeterminate" (nzCheckedChange)="checkAll($event)"></th>
    <th>编号</th>
    <th nzCustomFilter>标题</th>
    <th>正文内容</th>
    <th>分类名称</th>
    <th>部门名称</th>
    <th>上报时间</th>
    <th>操作</th>
  </tr>
  </thead>
  <tbody>
  <tr *ngFor="let data of nzTable.data">
    <td nzShowCheckbox [(nzChecked)]="data.checked" (nzCheckedChange)="refreshStatus()"></td>
    <td>{{data.id}}</td>
    <td>{{data.title}}</td>
    <td>{{data.content}}</td>
    <td>{{data.categoryname}}</td>
    <td>{{data.departmentname}}</td>
    <td>{{data.time | date:"yyyy-MM-dd hh:mm:ss"}}</td>
    <td>
      <button nz-button nzType="default" nzShape="circle" title="编辑"><i nz-icon type="edit"></i></button>&nbsp;&nbsp;
      <button nz-button nzType="default" nzShape="circle" title="删除"><i nz-icon type="close"></i></button>
    </td>
  </tr>
  </tbody>
</nz-table>
